<?php
/*session_start();
var_dump($_SESSION); // Affiche les informations de session*/
require("controleur/config_bdd.php");
// si la session existe pas soit si l'on est pas connecté on redirige
if(!isset($_SESSION['user_ve'])){
    header('Location:Connecter.php');
    die();
}

// On récupere les données de l'utilisateur
$req = $bdd->prepare('SELECT * FROM user_ve WHERE token_user = ?');
$req->execute(array($_SESSION['user_ve']));
$data = $req->fetch();

require_once("controleur/controleur.class.php"); 
$unControleur = new Controleur ();
?>

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="Connexion-style.css">
        <link rel="stylesheet" href="style.css">
        <link rel="stylesheet" href="Admin.css">
        <link rel="shortout icon" type="image/x-icon" href="Art_Yoshi_Ultimate.png"/>
        <title>Inscription</title>


        <!--link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@500&display=swap" rel="stylesheet"-->
        <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/brands.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/brands.min.css" integrity="sha512-8RxmFOVaKQe/xtg6lbscU9DU0IRhURWEuiI0tXevv+lXbAHfkpamD4VKFQRto9WgfOJDwOZ74c/s9Yesv3VvIQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/regular.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/regular.min.css" integrity="sha512-TzeemgHmrSO404wTLeBd76DmPp5TjWY/f2SyZC6/3LsutDYMVYfOx2uh894kr0j9UM6x39LFHKTeLn99iz378A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/solid.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/solid.min.css" integrity="sha512-pZlKGs7nEqF4zoG0egeK167l6yovsuL8ap30d07kA5AJUq+WysFlQ02DLXAmN3n0+H3JVz5ni8SJZnrOaYXWBA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/svg-with-js.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/svg-with-js.min.css" integrity="sha512-1dRVqjH1H79nqU3U7EhqE0E6G25FHVEqfoChIwiXBLk32sOWc6ZrgDzPax1VRuBr+NJknIO6B27MdlahVuZSRA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v4-font-face.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v4-font-face.min.css" integrity="sha512-vU8GapgME7Cc/sHTwbn2Q1eMBgE/ZBU8JL/oRo+Cw/frBXtmeekNEYbNe2gezj/cPaSdkTdERyimVSb+2F6f0A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v4-shims.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v4-shims.min.css" integrity="sha512-u6rY9/wehqytU8mKIhPvMDHtZmj6SbJ90Ctq8r5C+esABLe7qlQ2PY4l9gwK7xmr9fMp7d8yHvg2s3+nEsRjOg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v5-font-face.min.css"-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/v5-font-face.min.css" integrity="sha512-DG+gORwHSOHlIRwrUl2peOlG9vcxDg8qnbI1WkCfttaERikRSgrRoDeDa1PK4uZD24IJwAeKb6TuQk+/15b66A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <!--script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js" integrity="sha512-GWzVrcGlo0TxTRvz9ttioyYJ+Wwk9Ck0G81D+eO63BaqHaJ3YZX9wuqjwgfcV/MrB2PhaVX9DkYVhbFpStnqpQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script-->
    <!--script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/brands.min.js" integrity="sha512-giAmE8KpCT6HP3DEwIvW9LYVnDs79iIaKEYFTjH62EWoglWgdAJa1ahiLUfoc3NFaAeWM6E3VdQyH1Ob2dmwQw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script-->
    <!--script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/conflict-detection.min.js" integrity="sha512-7GbltvPUq7IRdFGoi+LQVL+KNVnVDfWcyxz9BfsGXwpOuqBysP/kPOYut4RfSipXadO8CL9oT4SzzN9aPMmeYg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/fontawesome.min.js" integrity="sha512-C8qHv0HOaf4yoA7ISuuCTrsPX8qjolYTZyoFRKNA9dFKnxgzIHnYTOJhXQIt6zwpIFzCrRzUBuVgtC4e5K1nhA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <!--script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/regular.min.js" integrity="sha512-T4H/jsKWzCRypzaFpVpYyWyBUhjKfp5e/hSD234qFO/h45wKAXba+0wG/iFRq1RhybT7dXxjPYYBYCLAwPfE0Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script-->
    <!--script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/solid.min.js" integrity="sha512-+fI924YJzeYFv7M0R29zJvRThPinSUOAmo5rpR9v6G4eWIbva/prHdZGSPN440vuf781/sOd/Fr+5ey0pqdW9w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script-->
    <!--script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/v4-shims.min.js" integrity="sha512-lcumC2XgVQA+cNJaYBRtZcTJ88EZ/Na2rG2yKtasO44flXlQWjvaqBqJch22AG9t/4pfD1EVD49oW8PBxtWBWg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script-->
    <!--link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha512-ZksRGFnwop1QG0mG8r+vj9U4+LGoW25vO5h9Gl5x/wxa2RCQpTwKboVAeKN4W+VqS8X3QQYkmPfS0a16/s+19g==" crossorigin="anonymous" referrerpolicy="no-referrer" /-->
    
</head>
    <body>
        <div class="logo-acceuil logo-accueil-pr">
            <!--a href="index.html"><img src="logo.png" alt="logo"></a-->
        </div>
        <div class="profil-container">
            <div class="presentation-case">
                <div class="avatar-case"><img src="img pr/Avatar.png" alt="Avatar"></div>
                <div class="presentation">
                    <h1>Bonjour <em><?php echo $data['prenom_user']; ?></em></h1> 
                    <p>Vous êtes parmi nous depuis 3 ans déjà en tant que <?php echo $data['statut_user']; ?></p> 
                </div>
                <div class="input-btn">
                    <button class="button-input button-input-deconx"><a href="deconnexion.php">Déconnexion</a></button>
                </div>
            </div>
            <?php 
                if(isset($_GET['reg_err']))
                {
                    $err = htmlspecialchars($_GET['reg_err']);

                    switch($err)
                    {
                        case 'success':
                        ?>
                            <div class="success-stl">
                                <strong>Succès</strong> inscription réussie !
                            </div>  
                        <?php
                        break;

                        case 'password':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> mot de passe différent
                            </div>  
                        <?php
                        break;

                        case 'email':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> email non valide
                            </div>
                        <?php
                        break;

                        case 'email_length':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> email trop long
                            </div>
                        <?php 
                        break;

                        case 'pseudo_length':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> pseudo trop long
                            </div>
                        <?php 
                        case 'already':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> compte deja existant
                            </div>
                        <?php 
                        case 'sx_miss':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> veuillez mettre votre genre
                            </div>
                        <?php 
                        case 'surname_miss':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> veuillez mettre votre nom
                            </div>
                        <?php 
                        case 'name_miss':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> veuillez mettre votre prenom
                            </div>
                        <?php 
                        case 'dob_miss':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> veuillez mettre votre date de naissance
                            </div>
                        <?php 
                        case 'ntel_miss':
                        ?>
                            <div class="error-stl">
                                <strong>Erreur</strong> veuillez mettre votre n°telephone
                            </div>
                        <?php 

                    }
                }
            ?>
            
            <div class="commande">
                <?php
                if(isset($data['statut_user']) && $data['statut_user'] == "client") {
                ?>
                    <div class="detail-user">
                        <ul class="alldetail-user">
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes commande</h3>
                                    <span>Suivre, annuler, retourner</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes demandes</h3>
                                    <span>Consulter l'avancement de mes dossiers</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes remboursement</h3>
                                    <span>Consulter mes bons d'achat</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes information personnelles</h3>
                                    <span>Email, mot de passe...</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes produits favoris</h3>
                                    <span>Consulter mes produits favoris</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                    <div class="propose">
                        <div class="last-commande">
                            <div class="title-commande">
                                <h2>Ma dernière commande</h2>
                                <span class="date-last-commande">Commandé le 6 mars 2023</span>    
                            </div>
                            <div class="row2">
                                <div class="cart-item-thumb visible-md visible-lg pic1">
                                    <a href="/fr/Products/Smartphones/Gamme-S20/Galaxy-S20-FE-5G/p/SM-G781BZBDEUH" data-an-tr="product-click" data-an-la="product click">
                                        <img src="https://images.samsung.com/is/image/samsung/fr-galaxy-s20-fe-5g-g781-sm-g781bzbdeuh-frontcloudnavy-303565634?$ORIGIN_PNG$" alt="Galaxy S20 FE 5G " data-automation-id="toko-thumb-image">
                                    </a>
                                </div>
                                <div class="cart-item-top">
                                    <div class="rowX cart-top-details">
                                        <div class="cart-item-details price-left">
                                            <a href="/fr/Products/Smartphones/Gamme-S20/Galaxy-S20-FE-5G/p/SM-G781BZBDEUH" data-an-tr="product-click" data-an-la="product click">
                                                <h3 class="name name-no-rtl" data-automation-id="name">Galaxy S20 FE 5G</h3>
                                            </a>
                                            <span class="size-color">Cloud Navy, 128 Go</span>
                                            <div class="sku" data-automation-id="cart-item-sku">
                                                SM-G781BZBDEUH<!-- ngIf: false -->
                                            </div>
                                            <span class="cart-item-promo-container"></span>
                                            <div class="cart-item-preorder visible-sm visible-xs"></div>
                                        </div>
                                        <div class="cart-item-actions cart-item-col-4 cart-item-inline-mobile price-commande">
                                            
                                            <div class="product-price-details col-xs-6 col-md-12 pull-price">
                                                <span class="item-price-commande" data-automation-id="item-price">
                                                499,00€
                                                    <div class="discount-price-formatted">
                                                        <div class="cart-was-price ng-scope" ng-if="!hideWasPriceForCart"><del>659,00€</del></div><!-- end ngIf: !hideWasPriceForCart -->
                                                    </div>
                                                </span>
                                            </div>
                                        </div>
                                        <div class="quatiter-commande">
                                            <span>Quantité : 1</span>
                                        </div>
                                    </div>
                                    <!--div class="cart-top-actions">
                                        <div class="cart-item-details visible-inline-desktop">
                                            <div class="cart-item-quantity product-quantity-details col-md-12 ng-scope" ng-if="!isMobile">
                                                <div class="cart-item-preorder row1 col-sm-12"></div>
                                                <div class="cart-quantity-ui " data-index="0" data-read-only-multid-grid="false">
                                                    <form id="updateCartForm0" class="cart-item-form ng-pristine ng-valid" data-cart="{&quot;cartCode&quot; : &quot;FR221106-38586887&quot;,&quot;productPostPrice&quot;:&quot;499.0&quot;,&quot;productName&quot;:&quot;Galaxy S20 FE 5G&quot;}" action="/fr/cart/update" method="post"><input type="hidden" name="entryNumber" value="0" autocomplete="off">
                                                        <input type="hidden" name="productCode" value="SM-G781BZBDEUH" autocomplete="off">
                                                        <input type="hidden" name="initialQuantity" value="1" autocomplete="off">
                                                        <div class="qty-selector js-cart-qty-selector" ng-show="true">
                                                            <span class="toko-group-element visible-sm-inline-block visible-md-inline-block visible-lg-inline-block">
                                                                <button class="btn-circle btn-qty-minus js-qty-selector-minus" type="button" data-automation-id="btn-qty-minus" data-maxlimitreached="false" data-updateable="true" data-an-tr="cart-product-remove" disabled="disabled">
                                                                    <span class="icon-minus-quantity" data-maxlimitreached="false" style="background-image: none;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M14 8H2" fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="square" stroke-width="2"></path></svg></span>
                                                                    <i class="sr-only">Reduce Quantity</i>
                                                                </button>
                                                            </span>
                                                            <span class="toko-group-element">
                                                                <span class="toko-input-overlay"></span>
                                                                <input id="quantity_0" name="quantity" class="form-control toko-control update-entry-quantity-input js-qty-selector-input" title="Quantité" data-maxlimitreached="false" data-price="659.0" data-automation-id="txt-qty" type="text" value="1" size="2"></span>
                                                                <span class="toko-group-element" data-toggle="" data-placement="top" data-content="Vous avez configuré le maximum de services pour ce produit. Veuillez retirer des services pour augmenter la quantité." data-container=".toko-group-element">
                                                                    <button id="btn-qty-plus-0" class="btn-circle btn-qty-plus js-qty-selector-plus " type="button" data-automation-id="btn-qty-plus" data-maxlimitreached="false" data-an-tr="move-to-cart" data-an-la="plus button">
                                                                        <span class="icon-plus-quantity" style="background-image: none;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 2v12m6-6H2" fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="square" stroke-width="2"></path></svg></span>
                                                                        <i class="sr-only">Add Quantity</i>
                                                                    </button>
                                                                </span>
                                                            </span>
                                                        </div>  
                                                        <div class="del-button"><i class="fa-solid fa-trash"></i></div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="cart-item-actions cart-item-col-4 visible-inline-desktop"></div>
                                    </div-->
                                    
                                </div>
                                <div class="cart-item-thumb visible-xs visible-sm">
                                    <a href="/fr/Products/Smartphones/Gamme-S20/Galaxy-S20-FE-5G/p/SM-G781BZBDEUH" data-omni-price="659" data-omni-pviname="Galaxy S20 FE 5G" data-omni-quantity="1" data-omni-base=";SM-G781B/DS" data-omni-variant="SM-G781BZBDEUH" data-omni-category="Mobile/Smartphone" data-omni-pimsubtype="Galaxy S"></a>
                                </div>
                                <div class="cart-item-bottom">
                                    <div class="added-services" id="added-services-0">
                                        <script type="text/javascript">
                                            function enableContinueBtn(){
                                                var publickey = '6LfNrEYUAAAAANiu0TebfI-ovc0PW-WdxncBhkIg'; 
                                                $("#trade-in-appID-form").prop("disabled", true);
                                                grecaptcha.render('captcha_container', {
                                                    'sitekey' : publickey,
                                                    'callback' : function(response) {
                                                    if(response.length != 0){
                                                        $("#trade-in-appID-form").prop("disabled", false);
                                                    }
                                                },
                                                    'expired-callback' : function(response) {
                                                        //$("#trade-in-appID-form").val()="";
                                                        document.getElementById("trade-in-appID-form").value="";
                                                        $("#trade-in-appID-form").prop("disabled", true);
                                                        $('#continueTradeIn').prop("disabled", true);
                                                    }
                                                });
                                            }
        
                                            function checkValid(){
                                                var tradeId= $("#trade-in-appID-form").val();
                                                if (tradeId.length > 0){
                                                    $('#continueTradeIn').prop("disabled", false);
                                                }  
                                                else{
                                                    $('#continueTradeIn').prop("disabled", true);
                                                }
                                            }
                                        </script>
                                        <input type="hidden" id="added-service-dtm-0" class="added-service-dtm" data-entry-number="0" data-base-sku="SM-G781B" data-variant-sku="SM-G781BZBDEUH" data-omni-base="SM-G781B" data-omni-variant="SM-G781BZBDEUH" data-omni-price="659.0" data-omni-pviname="Galaxy S20 FE 5G" data-omni-category="Galaxy Buds et Galaxy Watch/Buds" data-quantity="1" autocomplete="off">
                                        <ul>
                                            <li id="as-tradein" ng-class="{hide: false,'hasStackableTradeIn': false}">
                                                <div class="as-details full-width" ng-class="{'hasStackableTradeIn': false}" ng-init="asDetailsInit({
                                                                                                                    })">
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="dc-btn-case">
                                    <button placeholder="Submit" class="detail-commande-btn">Voir ma commande</button>
                                </div>
                            </div>
                        </div>
                        <div class="services-case">
                            <div class="title-commande">
                                <h2>Nos services</h2>
                            </div>
                            <div class="services">
                                <div class="service">
                                    <img src="img pr/telephone-586266_1920.jpg" alt="telephone" srcset="">
                                    <div class="service-detail">
                                        <h3>Recharge Lycamobile</h3>
                                        <span>Recharger en un click</span>
                                        <button placeholder="Submit" class="service-btn">Recharger</button>    
                                    </div>
                                </div>
                                <div class="service">
                                    <img src="img pr/office-620822_1920.jpg" alt="telephone" srcset="">
                                    <div class="service-detail">
                                        <h3>Carte SIM Lycamobile Activer</h3>
                                        <span>Recharger en un click</span>
                                        <button placeholder="Submit" class="service-btn">Voir plus</button>    
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                <?php
                }
                if(isset($data['statut_user']) && $data['statut_user'] == "Admin") {
                	//gestion admin 
                /*?> */ 
                    echo '<div class="detail-user">
                        <ul class="alldetail-user">
                            <li class="o1detail-user">
                            <a href="Connecter.php?page=1" class="clk-choos">
                                    <h3>Commande</h3>
                                    <span>Gerer les commande</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="Connecter.php?page=2" class="clk-choos">
                                    <h3>Gestion utilisateur</h3>
                                    <span>Ajouter, Modifier, Supprimer</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="Connecter.php?page=3" class="clk-choos">
                                    <h3>Voir utilisateurs</h3>
                                    <span>Consulter les utilisateurs qui sont inscrit</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="Connecter.php?page=4" class="clk-choos">
                                    <h3>Ajouter un categorie</h3>
                                    <span>Ajouter, Modifier, Supprimer</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                            <a href="Connecter.php?page=5" class="clk-choos">
                                    <h3>Ajouter un produit</h3>
                                    <span>Ajouter, Modifier, Supprimer</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="Connecter.php?page=6" class="clk-choos">
                                    <h3>Mes information personnelles</h3>
                                    <span>Email, mot de passe...</span>
                                </a>
                            </li>
                            
                            <li class="o1detail-user">
                                <a href="Connecter.php?page=7" class="clk-choos">
                                    <h3>Mes messages</h3>
                                    <span>Consulter mes messages</span>
                                </a>
                            </li>
                            <!--li class="o1detail-user">
                                <h3>Mes commande</h3>
                                <span>Suivre, annuler, retourner</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes demandes</h3>
                                <span>Consulter l\'avancement de mes dossiers</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes remboursement</h3>
                                <span>Consulter mes bons d\'achat</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes information personnelles</h3>
                                <span>Email, mot de passe...</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes messages</h3>
                                <span>Consulter mes messages</span>
                            </li-->
                        </ul>
                    </div>';
                    echo '<div class="propose">';
                    if (isset($_GET['page'])){
                        $page = $_GET['page'];
                    }else {
                        $page = 1 ; 
                    }
                    //$page = (isset($_GET['page'])) ? $_GET['page'] : 1 ; 
                    switch ($page){
                        case 1 : require_once ("commande&autres.php"); break; 
                        case 2 : require_once ("gestion_utilisateurs.php"); break; 
                        case 3 : require_once ("voir_utilisateurs.php"); break; 
                        case 4 : require_once ("gestion_categories.php"); break; 
                        case 5 : require_once ("gestion_produits.php"); break;
                        case 6 : require_once ("info_perso.php"); break; 
                        case 7 : require_once ("message_perso.php"); break; 
                        case 8 : session_destroy(); 
                                unset($_SESSION['email']); 
                                header("Location: index.php");
                                break;
                        default : require_once ("erreur.php"); break; 
                    }
                    echo '</div>';  
                /*<?php*/
                }
                if(isset($data['statut_user']) && $data['statut_user'] == "Employer") {
                ?>    
                    <div class="detail-user">
                        <ul class="alldetail-user">
                            <li class="o1detail-user">
                            <a href="http://" class="clk-choos">
                                    <h3>Preparer les Commandes</h3>
                                    <span>Preparer les Commandes</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Gérer les fournisseurs</h3>
                                    <span>Consulter les fourniseurs</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Voir clients</h3>
                                    <span>Consulter les clients qui sont inscrit</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Gérer les retours</h3>
                                    <span>remboursement ou d'échange</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                            <a href="http://" class="clk-choos">
                                    <h3>Ajouter un produit</h3>
                                    <span>Ajouter, Modifier, Supprimer</span>
                                </a>
                            </li>
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes information personnelles</h3>
                                    <span>Email, mot de passe...</span>
                                </a>
                            </li>
                            
                            <li class="o1detail-user">
                                <a href="http://" class="clk-choos">
                                    <h3>Mes messages</h3>
                                    <span>Consulter mes messages</span>
                                </a>
                            </li>
                            <!--li class="o1detail-user">
                                <h3>Mes commande</h3>
                                <span>Suivre, annuler, retourner</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes demandes</h3>
                                <span>Consulter l'avancement de mes dossiers</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes remboursement</h3>
                                <span>Consulter mes bons d'achat</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes information personnelles</h3>
                                <span>Email, mot de passe...</span>
                            </li>
                            <li class="o1detail-user">
                                <h3>Mes messages</h3>
                                <span>Consulter mes messages</span>
                            </li-->
                        </ul>
                    </div>
                    <div class="propose">
                        <div class="last-commande">
                            <div class="title-commande">
                                <h2>La dernière commande du client</h2>
                                <span class="date-last-commande">Commandé le 6 mars 2023 par "nom client"</span>    
                            </div>
                            <div class="row2">
                                <div class="cart-item-thumb visible-md visible-lg pic1">
                                    <a href="/fr/Products/Smartphones/Gamme-S20/Galaxy-S20-FE-5G/p/SM-G781BZBDEUH" data-an-tr="product-click" data-an-la="product click">
                                        <img src="https://images.samsung.com/is/image/samsung/fr-galaxy-s20-fe-5g-g781-sm-g781bzbdeuh-frontcloudnavy-303565634?$ORIGIN_PNG$" alt="Galaxy S20 FE 5G " data-automation-id="toko-thumb-image">
                                    </a>
                                </div>
                                <div class="cart-item-top">
                                    <div class="rowX cart-top-details">
                                        <div class="cart-item-details price-left">
                                            <a href="/fr/Products/Smartphones/Gamme-S20/Galaxy-S20-FE-5G/p/SM-G781BZBDEUH" data-an-tr="product-click" data-an-la="product click">
                                                <h3 class="name name-no-rtl" data-automation-id="name">Galaxy S20 FE 5G</h3>
                                            </a>
                                            <span class="size-color">Cloud Navy, 128 Go</span>
                                            <div class="sku" data-automation-id="cart-item-sku">
                                                SM-G781BZBDEUH<!-- ngIf: false -->
                                            </div>
                                            <span class="cart-item-promo-container"></span>
                                            <div class="cart-item-preorder visible-sm visible-xs"></div>
                                        </div>
                                        <div class="cart-item-actions cart-item-col-4 cart-item-inline-mobile price-commande">
                                            
                                            <div class="product-price-details col-xs-6 col-md-12 pull-price">
                                                <span class="item-price-commande" data-automation-id="item-price">
                                                499,00€
                                                    <div class="discount-price-formatted">
                                                        <div class="cart-was-price ng-scope" ng-if="!hideWasPriceForCart"><del>659,00€</del></div><!-- end ngIf: !hideWasPriceForCart -->
                                                    </div>
                                                </span>
                                            </div>
                                        </div>
                                        <div class="quatiter-commande">
                                            <span>Quantité : 1</span>
                                        </div>
                                    </div>
                                    <!--div class="cart-top-actions">
                                        <div class="cart-item-details visible-inline-desktop">
                                            <div class="cart-item-quantity product-quantity-details col-md-12 ng-scope" ng-if="!isMobile">
                                                <div class="cart-item-preorder row1 col-sm-12"></div>
                                                <div class="cart-quantity-ui " data-index="0" data-read-only-multid-grid="false">
                                                    <form id="updateCartForm0" class="cart-item-form ng-pristine ng-valid" data-cart="{&quot;cartCode&quot; : &quot;FR221106-38586887&quot;,&quot;productPostPrice&quot;:&quot;499.0&quot;,&quot;productName&quot;:&quot;Galaxy S20 FE 5G&quot;}" action="/fr/cart/update" method="post"><input type="hidden" name="entryNumber" value="0" autocomplete="off">
                                                        <input type="hidden" name="productCode" value="SM-G781BZBDEUH" autocomplete="off">
                                                        <input type="hidden" name="initialQuantity" value="1" autocomplete="off">
                                                        <div class="qty-selector js-cart-qty-selector" ng-show="true">
                                                            <span class="toko-group-element visible-sm-inline-block visible-md-inline-block visible-lg-inline-block">
                                                                <button class="btn-circle btn-qty-minus js-qty-selector-minus" type="button" data-automation-id="btn-qty-minus" data-maxlimitreached="false" data-updateable="true" data-an-tr="cart-product-remove" disabled="disabled">
                                                                    <span class="icon-minus-quantity" data-maxlimitreached="false" style="background-image: none;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M14 8H2" fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="square" stroke-width="2"></path></svg></span>
                                                                    <i class="sr-only">Reduce Quantity</i>
                                                                </button>
                                                            </span>
                                                            <span class="toko-group-element">
                                                                <span class="toko-input-overlay"></span>
                                                                <input id="quantity_0" name="quantity" class="form-control toko-control update-entry-quantity-input js-qty-selector-input" title="Quantité" data-maxlimitreached="false" data-price="659.0" data-automation-id="txt-qty" type="text" value="1" size="2"></span>
                                                                <span class="toko-group-element" data-toggle="" data-placement="top" data-content="Vous avez configuré le maximum de services pour ce produit. Veuillez retirer des services pour augmenter la quantité." data-container=".toko-group-element">
                                                                    <button id="btn-qty-plus-0" class="btn-circle btn-qty-plus js-qty-selector-plus " type="button" data-automation-id="btn-qty-plus" data-maxlimitreached="false" data-an-tr="move-to-cart" data-an-la="plus button">
                                                                        <span class="icon-plus-quantity" style="background-image: none;"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"><path d="M8 2v12m6-6H2" fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="square" stroke-width="2"></path></svg></span>
                                                                        <i class="sr-only">Add Quantity</i>
                                                                    </button>
                                                                </span>
                                                            </span>
                                                        </div>  
                                                        <div class="del-button"><i class="fa-solid fa-trash"></i></div>
                                                    </form>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="cart-item-actions cart-item-col-4 visible-inline-desktop"></div>
                                    </div-->
                                    
                                </div>
                                <div class="cart-item-thumb visible-xs visible-sm">
                                    <a href="/fr/Products/Smartphones/Gamme-S20/Galaxy-S20-FE-5G/p/SM-G781BZBDEUH" data-omni-price="659" data-omni-pviname="Galaxy S20 FE 5G" data-omni-quantity="1" data-omni-base=";SM-G781B/DS" data-omni-variant="SM-G781BZBDEUH" data-omni-category="Mobile/Smartphone" data-omni-pimsubtype="Galaxy S"></a>
                                </div>
                                <div class="cart-item-bottom">
                                    <div class="added-services" id="added-services-0">
                                        <script type="text/javascript">
                                            function enableContinueBtn(){
                                                var publickey = '6LfNrEYUAAAAANiu0TebfI-ovc0PW-WdxncBhkIg'; 
                                                $("#trade-in-appID-form").prop("disabled", true);
                                                grecaptcha.render('captcha_container', {
                                                    'sitekey' : publickey,
                                                    'callback' : function(response) {
                                                    if(response.length != 0){
                                                        $("#trade-in-appID-form").prop("disabled", false);
                                                    }
                                                },
                                                    'expired-callback' : function(response) {
                                                        //$("#trade-in-appID-form").val()="";
                                                        document.getElementById("trade-in-appID-form").value="";
                                                        $("#trade-in-appID-form").prop("disabled", true);
                                                        $('#continueTradeIn').prop("disabled", true);
                                                    }
                                                });
                                            }
        
                                            function checkValid(){
                                                var tradeId= $("#trade-in-appID-form").val();
                                                if (tradeId.length > 0){
                                                    $('#continueTradeIn').prop("disabled", false);
                                                }  
                                                else{
                                                    $('#continueTradeIn').prop("disabled", true);
                                                }
                                            }
                                        </script>
                                        <input type="hidden" id="added-service-dtm-0" class="added-service-dtm" data-entry-number="0" data-base-sku="SM-G781B" data-variant-sku="SM-G781BZBDEUH" data-omni-base="SM-G781B" data-omni-variant="SM-G781BZBDEUH" data-omni-price="659.0" data-omni-pviname="Galaxy S20 FE 5G" data-omni-category="Galaxy Buds et Galaxy Watch/Buds" data-quantity="1" autocomplete="off">
                                        <ul>
                                            <li id="as-tradein" ng-class="{hide: false,'hasStackableTradeIn': false}">
                                                <div class="as-details full-width" ng-class="{'hasStackableTradeIn': false}" ng-init="asDetailsInit({
                                                                                                                    })">
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="dc-btn-case">
                                    <button placeholder="Submit" class="detail-commande-btn">Voir ma commande</button>
                                </div>
                            </div>
                        </div>
                        <div class="options-case">
                            <div class="title-commande">
                                <h2>Autre</h2>
                            </div>
                            <div class="options">
                                <div class="option">
                                    <img src="img pr/telephone-586266_1920.jpg" alt="telephone" srcset="">
                                    <div class="option-detail">
                                        <h3>Les Statistiques</h3>
                                        <span>Voir les Statistiques de ce mois</span>
                                        <button placeholder="Submit" class="service-btn">Voir les Stats</button>    
                                    </div>
                                </div>
                                <!--div class="option">
                                    <img src="img pr/telephone-586266_1920.jpg" alt="telephone" srcset="">
                                    <div class="option-detail">
                                        <h3>Partager</h3>
                                        <span>Partager et gagner une commision 3% sur chaque vente</span>
                                        <button placeholder="Submit" class="service-btn">Voir les Stats</button>    
                                    </div>
                                </div-->
                                <div class="option">
                                    <img src="img pr/office-620822_1920.jpg" alt="telephone" srcset="">
                                    <div class="option-detail">
                                        <h3>Les avis clients</h3>
                                        <span>Les avis &amp; notes de mes clients</span>
                                        <button placeholder="Submit" class="service-btn">Voir les avis</button>    
                                    </div>
                                </div>
                                <div class="option">
                                    <img src="img pr/office-620822_1920.jpg" alt="telephone" srcset="">
                                    <div class="option-detail">
                                        <h3>Clients bani</h3>
                                        <span>Les clients que vous avez bani</span>
                                        <button placeholder="Submit" class="service-btn">Voir</button>    
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>  
                <?php
                }
                ?>                                                                                              
            </div>
        </div>
        <script src="input-js.js"></script>
        <script src="show-pass.js"></script>
        <script>
            function openTab(evt, tabName) {
                var i, tabContent, tabLinks;
                tabContent = document.getElementsByClassName("insert-place");
                for (i = 0; i < tabContent.length; i++) {
                    tabContent[i].style.display = "none";
                }
                tabLinks = document.getElementsByClassName("button-onglet");
                for (i = 0; i < tabLinks.length; i++) {
                    tabLinks[i].className = tabLinks[i].className.replace(" active", "");
                }
                document.getElementById(tabName).style.display = "block";
                    evt.currentTarget.className += " active";
            }
        </script>
        <script>
    const fileInput = document.querySelector("#fileInput");
    const icon = document.querySelector(".icon");
    const fileNameElement = document.querySelector("#fileName");

    fileInput.addEventListener('change', function () {
        const files = fileInput.files;
        if (files.length > 0) {
            const fileName = files[0].name;
            fileNameElement.innerHTML = fileName;
            icon.innerHTML = "download_done";
        } else {
            fileNameElement.innerHTML = 'Aucun fichier sélectionné';
            icon.innerHTML = "cloud_upload"; // Efface l'icône s'il n'y a pas de fichier sélectionné
        }
    });
</script>
    </body>
</html>
